package disizhou;

public class Date {
    private int year;
    private int month;
    private int day;
    public Date() {
    }
    public Date(int year, int month, int day) {
        this.year = year;
        this.day = day;
        this.month = month;
    }
    public int getDay() {
        return day;
    }
    public void setDay(int day) {
        this.day = day;
    }
    public int getMonth() {
        return month;
    }
    public void setMonth(int month) {
        this.month = month;
    }
    public int getYear() {
        return year;
    }
    public void setYear(int year) {
        this.year = year;
    }
    @Override
    public String toString() {
        return this.year + "." + this.month + "." + this.day;
    }

    public boolean judgeleapyear(){
        if (this.year % 4 == 0 && this.year % 100 != 0 || this.year % 400 == 0)
        {
            return true;
        }
        return false;
    }
}